﻿using NetCore.CustomAttributes;
using NetCore.Entities.Organizations;
using NetCore.ValueObjects;
using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace NetCore.Entities.Projects
{
    /// <summary>
    /// 项目
    /// </summary>
    [Description("项目")]
    public class Project : BaseEntity
    {
        public Project()
        {
            Attachments = new HashSet<ProjectAttachment>();
            ProjectUsers = new HashSet<ProjectUser>();
        }

        /// <summary>
        /// 课程期数
        /// </summary>
        [Description("期数")]
        public int? Period { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Description("名称")]
        public string Name { get; set; }
        /// <summary>
        /// 开始日期
        /// </summary>
        [Description("开始日期")]
        public DateTime? StartDate { get; set; }
        /// <summary>
        /// 计划结束日期
        /// </summary>
        [Description("计划结束日期")]
        public DateTime? PlanEndDate { get; set; }
        /// <summary>
        /// 结束日期
        /// </summary>
        [Description("结束日期")]
        public DateTime? EndDate { get; set; }
        /// <summary>
        /// 总金额
        /// </summary>
        [Description("总金额")]
        public decimal? Amount { get; set; }
        /// <summary>
        /// 百分比
        /// </summary>
        [Description("百分比")]
        public decimal? Percent { get; set; }
        /// <summary>
        /// 单价
        /// </summary>
        [Description("单价")]
        public decimal? Price { get; set; }
        /// <summary>
        /// 所属地区
        /// </summary>
        [Description("所属地区")]
        public Address Address { get; set; }
        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        public string Remark { get; set; }
        /// <summary>
        /// 项目示意图文件服务器虚拟路径
        /// </summary>
        [Description("项目示意图")]
        public string MapPath { get; set; }
        /// <summary>
        /// 项目附件
        /// </summary>
        [NotSet, Description("项目附件")]
        public virtual HashSet<ProjectAttachment> Attachments { get; set; }
        /// <summary>
        /// 项目用户/学员
        /// </summary>
        [NotSet, Description("项目用户")]
        public virtual HashSet<ProjectUser> ProjectUsers { get; set; }


        /// <summary>
        /// 组织
        /// </summary>
        [NotSet, Description("组织")]
        public virtual Organization Organization { get; set; }
    }
}
